﻿@using NetCoreCMS.Common;
@using NetCoreCMS.Models;
@{
    Layout = "~/Areas/admin/Views/Shared/_LayoutEdit.cshtml";
    ViewBag.Title = "payment_edit";
    Payment m = ViewData["model"] as Payment;
    Sysconfig sysConfig = ViewData["config"] as Sysconfig;
}
@section HeaderContent{
    <script>
        $(function () {
            //初始化表单验证
            $("#form1").initValidform();
            //初始化上传控件
            $(".upload-img").InitUploader({ sendurl: "/upload_ajax/index", swf: "/scripts/webuploader/uploader.swf" });
        });
    </script>
}
<form id="form1" method="post" action="SubmitSave?action=@ViewBag.Action&id=@ViewBag.Id">
    <!--导航栏-->
    <div class="location">
        <a href="../payment_list/index" class="back"><i class="iconfont icon-up"></i><span>返回列表页</span></a>
        <a href="../center/index"><i class="iconfont icon-home"></i><span>首页</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <a href="../payment_list/index"><span>支付方式</span></a>
        <i class="arrow iconfont icon-arrow-right"></i>
        <span>编辑支付方式</span>
        <div class="clipboard">
            <span><label id="clipMess"></label></span>
            <a href="javascript:;" class="copy" onclick="copy();"><i class="iconfont icon-copy"></i><span>复制</span></a>
            <a href="javascript:;" class="paste disable" onclick="paste();"><i class="iconfont icon-log"></i><span>粘贴</span></a>
        </div>
    </div>
    <div class="line10"></div>
    <!--/导航栏-->
    <!--内容-->
    <div id="floatHead" class="content-tab-wrap">
        <div class="content-tab">
            <div class="content-tab-ul-wrap">
                <ul>
                    <li><a class="selected" href="javascript:;">配置支付方式</a></li>
                </ul>
            </div>
        </div>
    </div>

    <div class="tab-content">
        <dl>
            <dt>标题名称</dt>
            <dd>@Html.TextBox("txtTitle", m.title, new { @class = "input normal", datatype = "*2-100", sucmsg = " " })<span class="Validform_checktip">*</span></dd>
        </dl>
        <dl>
            <dt>支付类型</dt>
            <dd>
                <div class="rule-multi-radio">
                    @Html.RadioButton("rblType", "1", m.type == 1, new { id = "rblType_1", disabled = "disabled" })<label for="rblType_1">线上支付</label>
                    @Html.RadioButton("rblType", "2", m.type == 2, new { id = "rblType_2", disabled = "disabled" })<label for="rblType_2">线下支付</label>
                </div>
                <span class="Validform_checktip">*线上付款自动验证付款状态</span>
            </dd>
        </dl>
        <dl>
            <dt>是否启用</dt>
            <dd>
                <div class="rule-single-checkbox">
                    @Html.CheckBox("cbIsLock", m.is_lock == 0)
                </div>
                <span class="Validform_checktip">*不启用则不显示该支付方式</span>
            </dd>
        </dl>
        <dl>
            <dt>排序数字</dt>
            <dd>
                @Html.TextBox("txtSortId", m.sort_id, new { @class = "input small", datatype = "n", sucmsg = " " })
                <span class="Validform_checktip">*数字，越小越向前</span>
            </dd>
        </dl>
        <dl>
            <dt>手续费类型</dt>
            <dd>
                <div class="rule-multi-radio">
                    @Html.RadioButton("rblPoundageType", "1", m.poundage_type == 1, new { id = "rblPoundageType_1" })<label for="rblPoundageType_1">百分比</label>
                    @Html.RadioButton("rblPoundageType", "2", m.poundage_type == 2, new { id = "rblPoundageType_2" })<label for="rblPoundageType_2">固定金额</label>
                </div>
                <span class="Validform_checktip">*百分比的计算公式：商品总金额+(商品总金额*百分比)+配送费用=订单总金额</span>
            </dd>
        </dl>
        <dl>
            <dt>支付手续费</dt>
            <dd>
                @Html.TextBox("txtPoundageAmount", m.poundage_amount, new { @class = "input small", datatype = @"/^(([1-9]{1}\d*)|([0]{1}))(\.(\d){1,2})?$/", sucmsg = " " })
                <span class="Validform_checktip">*注意：百分比取值范围：0-100，固定金额单位为“元”</span>
            </dd>
        </dl>
        <dl>
            <dt>显示图标</dt>
            <dd>
                @Html.TextBox("txtImgUrl", m.img_url, new { @class = "input normal upload-path" })
                <div class="upload-box upload-img"></div>
            </dd>
        </dl>
        <dl>
            <dt>API目录名</dt>
            <dd>
                @Html.TextBox("txtApiPath", m.api_path, new { @class = "input normal", datatype = "*0-255", sucmsg = " " })
                <span class="Validform_checktip">*支付平台所在的API目录名</span>
            </dd>
        </dl>
        <dl>
            <dt>支付链接页面</dt>
            <dd>
                @Html.TextBox("txtRedirectUrl", m.redirect_url, new { @class = "input normal", datatype = "*0-255", sucmsg = " " })
                <span class="Validform_checktip">*前台跳转到该支付页面的URL</span>
            </dd>
        </dl>
        <dl>
            <dt>支付返回页面</dt>
            <dd>
                @Html.TextBox("txtReturnUrl", m.return_url, new { @class = "input normal", datatype = "*0-255", sucmsg = " " })
                <span class="Validform_checktip">*支付完成后跳转到成功页面的URL</span>
            </dd>
        </dl>
        <dl>
            <dt>支付通知页面</dt>
            <dd>
                @Html.TextBox("txtNotifyUrl", m.notify_url, new { @class = "input normal", datatype = "*0-255", sucmsg = " " })
                <span class="Validform_checktip">*支付完成后通知修改订单状态的URL</span>
            </dd>
        </dl>
        <dl>
            <dt>描述说明</dt>
            <dd>
                @Html.TextArea("txtRemark", m.remark, new { @class = "input normal" })
                <span class="Validform_checktip">支付方式的描述说明，支持HTML代码</span>
            </dd>
        </dl>
    </div>
    <!--/内容-->
    <!--工具栏-->
    <div class="page-footer">
        <div class="btn-wrap">
            <input type="submit" id="btnSubmit" class="btn" value="提交保存" />
            <input name="btnReturn" type="button" value="返回上一页" class="btn yellow" onclick="javascript:history.back(-1);" />
        </div>
    </div>
    <!--/工具栏-->

</form>
